package com.bridge.common.enums;


public enum SmsTypeEnum {

    BIND_PHONE(1, "绑定手机号"),
    SMS_LOGIN(2, "短信登录"),
    SMS_NOTICE(3,"短信通知"),
    SMS_REGISTER(4,"注册"),
    SMS_FORGET(5,"忘记密码")
    ;

    private int type;
    private String desc;


    SmsTypeEnum(int type, String desc) {
        this.type = type;
        this.desc = desc;
    }

    public static String getDescByType(int type) {

        for (SmsTypeEnum var : SmsTypeEnum.values()) {
            if (var.getType() == type) {
                return var.getDesc();
            }

        }

        return "注册";
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }
}
